// JavaScript Document
function gets_id(objName){
 if(document.getElementById){
  return eval('document.getElementById("' + objName + '")');
 }else if(document.layers){
  return eval("document.layers['" + objName +"']");
 }else{
  return eval('document.all.' + objName);
 }
}
//打开DIV层
function disp_cc(name1)
{
 if(gets_id(name1).style.display=='none')
 {
  gets_id(name1).style.display='';
 }
 else
 {
  gets_id(name1).style.display='none';
 }
}
//赋值
function gets_value(str0,str1,str3)
{
 gets_id(str3).value=str1;
 gets_id(str1).style.display='none';
}
function set_display(str)
{
    gets_id(str).style.display='none';
}

document.onclick=function(e){
    //gets_id('hh').style.display='none';
	whichElement(e);
}  


function whichElement(e)
{
    var targ
    if (!e) var e = window.event
    if (e.target) {
	    targ = e.target
	}
    else if (e.srcElement) {
	    targ = e.srcElement
	}
    if (targ.nodeType == 3) {// 判断错误
        targ = targ.parentNode
	}
    
    var tname=targ.tagName
    
	if(targ.id!="val" ){
	    set_display('content');
	}
	if(targ.id!="val2" ){
	    set_display('content2');
	}
	if(targ.id!="val3" ){
	    set_display('content3');
	}
	if(targ.id!="val4" ){
	    set_display('content4');
	}
	if(targ.id!="val5" ){
	    set_display('content5');
	}
}

